package com.ydy.service;

import com.ydy.domain.ScoreInfo;
import com.ydy.domain.Student;
import com.ydy.vo.JsonResult;
import com.ydy.vo.Studentvo;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.swing.*;
import java.util.List;

public interface StudentBiz {
    @Transactional(rollbackFor = Exception.class)
    void insertStudent(Student student);


    void updateStudentByName(Student student);

    void deleteById(Integer id);

    Studentvo getStudentvo(Integer id);

    void addStudent(Studentvo studentvo);

    Studentvo getSrudentvowithRedis(String name);

    boolean checkName(String name, String password);

    Studentvo getSrudentvowithAccount(String name);

    JsonResult addStudentInfo(Studentvo studentvo);

    Studentvo checkAccount(String account, String password);

    Studentvo getStudentInfo(ServletRequest request);
    JsonResult vote(ScoreInfo scoreInfo, HttpServletRequest request);
    //查询所有人的分数
    List<Student> findAllScoreInfo();
    //登陆方法，返回token
    String login(Studentvo studentvo);
//}}
}